220
|
How can I remove all the columns

With ComboBox1
.Columns.Clear
End With
|
219
|
How can I remove a column

With ComboBox1
.Columns.Remove "A"
End With
|
482
|
How can I put icons/images into buttons

With ComboBox1
.BeginUpdate
.SingleEdit = True
.Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
.Columns.Add ""
With .Columns.Add("C+B")
.AllowSizing = False
.Width = 48
.FormatColumn = "` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `"
.Def(17) = 1
.Def(0) = True
.Def(2) = True
.Def(3) = True
.Position = 0
End With
.DrawGridLines = 2
.DefaultItemHeight = 20
With .Items
.AddItem "Item 1"
.AddItem "Item 2"
.AddItem "Item 3"
.AddItem "Item 4"
.AddItem "Item 5"
.AddItem "Item 6"
.AddItem "Item 7"
.AddItem "Item 8"
End With
.EndUpdate
End With
|
205
|
How can I programmatically filter a column

With ComboBox1
With .Columns.Add("Filter")
.DisplayFilterButton = True
.FilterType = 2
End With
.Items.AddItem
.Items.AddItem "not empty"
.ApplyFilter
End With
|
503
|
How can I programmatically clear the control's filter
' Click event - Occurs when the user presses and then releases the left mouse button over the list control.
Private Sub ComboBox1_Click()
With ComboBox1
.ClearFilter
End With
End Sub
With ComboBox1
.BeginUpdate
.Columns.Add("Item").DisplayFilterButton = True
With .Columns.Add("Pos")
.AllowSizing = False
.AllowSort = False
.Width = 32
.FormatColumn = "1 apos ``"
.Position = 0
End With
With .Items
.AddItem "Item A"
.AddItem "Item B"
.AddItem "Item C"
End With
.FilterBarPromptVisible = 1
.FilterBarPromptPattern = "B"
.EndUpdate
End With
|
91
|
How can I programmatically change the column where incremental searching is performed

With ComboBox1
.Columns.Add "Column 1"
.Columns.Add "Column 2"
With .Items
.CellCaption(.AddItem("Item 1"),1) = "SubItem 1"
End With
.SearchColumnIndex = 1
End With
|
488
|
How can I prevent showing the lines for the hierarchy while using the exMatchingItemsOnly option

With ComboBox1
.BeginUpdate
.LinesAtRoot = -1
.TreeColumnIndex = -1
.FilterInclude = 4
With .Columns.Add("Column")
.DisplayFilterButton = True
.FilterType = 240
.Filter = "C1|C2"
End With
With .Items
h = .AddItem("R1")
.InsertItem h,,"C1"
.InsertItem h,,"C2"
.ExpandItem(h) = True
h = .AddItem("R2")
.InsertItem h,,"C1"
.InsertItem h,,"C2"
End With
.ApplyFilter
.EndUpdate
End With
|
315
|
How can I merge cells

With ComboBox1
.MarkSearchColumn = False
.TreeColumnIndex = -1
.Columns.Add "C1"
.Columns.Add "C2"
With .Items
h = .AddItem("Cell 1")
.CellCaption(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines."
.CellSingleLine(h,1) = False
h = .AddItem("This is bit of text merges all cells in the item")
.ItemDivider(h) = 0
.CellHAlignment(h,0) = 1
End With
End With
|
316
|
How can I merge cells

With ComboBox1
.DrawGridLines = -1
.MarkSearchColumn = False
.Columns.Add "C1"
.Columns.Add "C2"
.Columns.Add "C3"
With .Items
h = .AddItem("this cell merges the first two columns")
.CellMerge(h,0) = 1
h = .AddItem()
.CellCaption(h,1) = "this cell merges the last two columns"
.CellMerge(h,1) = 2
h = .AddItem("this cell merges the all three columns")
.CellMerge(h,0) = 1
.CellMerge(h,0) = 2
h = .AddItem("this draws a divider item")
.ItemDivider(h) = 0
End With
End With
|
364
|
How can I mark the cells that has a specified type, ie strings only

With ComboBox1
.ConditionalFormats.Add("type(%0) = 8").ForeColor = RGB(255,0,0)
.Columns.Add ""
With .Items
h = .AddItem("Root")
.InsertItem h,,"Child 1"
.InsertItem h,,2
.InsertItem h,,"Chld 3"
.ExpandItem(h) = True
End With
End With
|
467
|
How can I make bigger/enlarge the control's drop down button

With ComboBox1
.BeginUpdate
.LabelHeight = 40
.ScrollWidth = 40
.EndUpdate
End With
|
254
|
How can I make an item unselectable, or not selectable

With ComboBox1
.Columns.Add "Column"
With .Items
h = .AddItem("unselectable - you can't get selected")
.SelectableItem(h) = False
.AddItem "selectable"
End With
End With
|
7
|
How can I insert an icon to column's header

With ComboBox1
.Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
.Columns.Add("ColumnName").HTMLCaption = "<b>HTML</b> Column <img>1</img> Icon"
End With
|
6
|
How can I insert an icon to column's header

With ComboBox1
.Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
.Columns.Add("ColumnName").HeaderImage = 1
End With
|
295
|
How can I insert a hyperlink or an anchor element

With ComboBox1
.Columns.Add "Column"
With .Items
.CellCaptionFormat(.AddItem("Just an <a1>anchor</a> element ..."),0) = 1
End With
With .Items
.CellCaptionFormat(.AddItem("Just another <a2>anchor</a> element ..."),0) = 1
End With
End With
|
360
|
How can I highlight the cells or items that starts with a specified string

With ComboBox1
.ConditionalFormats.Add("%0 startwith 'C'").Underline = True
.Columns.Add ""
With .Items
h = .AddItem("Root")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.InsertItem h,,"SChild 3"
.ExpandItem(h) = True
End With
End With
|
421
|
How can I highlight only parts of the cells

With ComboBox1
With .Columns.Add("")
.Def(17) = 1
.FormatColumn = "value replace 'hil' with '<fgcolor=FF0000><b>hil</b></fgcolor>'"
End With
With .Items
h = .AddItem("Root")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.InsertItem h,,"Child 3"
.ExpandItem(h) = True
End With
End With
|
11
|
How can I hide the searching column

With ComboBox1
.MarkSearchColumn = False
.Columns.Add "Column 1"
.Columns.Add "Column 2"
.Items.AddItem
End With
|
126
|
How can I hide the locked / fixed items

With ComboBox1
.ShowLockedItems = False
.Columns.Add "Column"
With .Items
.LockedItemCount(0) = 1
.CellCaption(.LockedItem(0,0),0) = "locked item"
.AddItem "un-locked item"
End With
End With
|
342
|
How can I hide the drop down buttons when the control loses the focus

With ComboBox1
.HideDropDownButton = True
.IntegralHeight = True
.LinesAtRoot = 1
.TreeColumnIndex = 1
.Columns.Add "Column 1"
.Columns.Add "Column 2"
With .Items
h = .AddItem("Root 1.1")
.CellCaption(h,1) = "Root 1.2"
.CellCaption(.InsertItem(h,,"Child 1.1"),1) = "Child 1.2"
.CellCaption(.InsertItem(h,,"Child 2.1"),1) = "Child 2.2"
.ExpandItem(h) = True
h = .AddItem("Root 2.1")
.CellCaption(h,1) = "Root 2.2"
.CellCaption(.InsertItem(h,,"Child 1.1"),1) = "Child 1.2"
End With
End With
|
253
|
How can I hide or show an item

With ComboBox1
.Columns.Add "Column"
With .Items
h = .AddItem("hidden")
.ItemHeight(h) = 0
.SelectableItem(h) = False
.AddItem "visible"
End With
End With
|
120
|
How can I hide a column

With ComboBox1
.Columns.Add("Hidden").Visible = False
.Columns.Add "2"
.Columns.Add "3"
.Columns.Add "4"
.Columns.Add "5"
End With
|
461
|
How can I have a case-sensitive filter

With ComboBox1
.BeginUpdate
.MarkSearchColumn = False
With .Columns
With .Add("Car")
.DisplayFilterButton = True
.FilterType = 496 ' FilterTypeEnum.exFilterDoCaseSensitive Or FilterTypeEnum.exFilter
.Filter = "Mazda"
End With
With .Add("Equipment")
.DisplayFilterButton = True
.DisplayFilterPattern = False
.CustomFilter = "Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*"
.FilterType = 259 ' FilterTypeEnum.exFilterDoCaseSensitive Or FilterTypeEnum.exPattern
.Filter = "Air Bag"
End With
End With
With .Items
.CellCaption(.AddItem("Mazda"),1) = "Air Bag"
.CellCaption(.AddItem("Toyota"),1) = "Air Bag,Air condition"
.CellCaption(.AddItem("Ford"),1) = "Air condition"
.CellCaption(.AddItem("Nissan"),1) = "Air Bag,ABS,ESP"
.CellCaption(.AddItem("Mazda"),1) = "Air Bag, ABS,ESP"
.CellCaption(.AddItem("Mazda"),1) = "ABS,ESP"
End With
.ApplyFilter
.EndUpdate
End With
|
462
|
How can I have a case-insensitive filter (exFilterDoCaseSensitive flag is not set)

With ComboBox1
.BeginUpdate
.MarkSearchColumn = False
With .Columns
With .Add("Car")
.DisplayFilterButton = True
.FilterType = 240
.Filter = "MAZDA"
End With
With .Add("Equipment")
.DisplayFilterButton = True
.DisplayFilterPattern = False
.CustomFilter = "Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*"
.FilterType = 3
.Filter = "AIR BAG"
End With
End With
With .Items
.CellCaption(.AddItem("Mazda"),1) = "Air Bag"
.CellCaption(.AddItem("Toyota"),1) = "Air Bag,Air condition"
.CellCaption(.AddItem("Ford"),1) = "Air condition"
.CellCaption(.AddItem("Nissan"),1) = "Air Bag,ABS,ESP"
.CellCaption(.AddItem("Mazda"),1) = "Air Bag, ABS,ESP"
.CellCaption(.AddItem("Mazda"),1) = "ABS,ESP"
End With
.ApplyFilter
.EndUpdate
End With
|
29
|
How can I get underlined only a portion of column's header

With ComboBox1
.Columns.Add("Column 1").HTMLCaption = "<u>Col</u>umn 1"
End With
|
218
|
How can I get the number or the count of columns
With ComboBox1
var_Count = .Columns.Count
End With
|
519
|
How can I get the number of results/items being shown in the control's filter bar (sample 4)

With ComboBox1
.BeginUpdate
With .Columns.Add("Item")
.DisplayFilterButton = True
.FilterList = 9504 ' FilterListEnum.exShowExclude Or FilterListEnum.exShowFocusItem Or FilterListEnum.exShowCheckBox Or FilterListEnum.exSortItemsAsc
End With
With .Columns.Add("Pos")
.AllowSizing = False
.AllowSort = False
.Width = 32
.FormatColumn = "1 apos ``"
.Position = 0
End With
With .Items
.AddItem "Item A"
.AddItem "Item B"
.AddItem "Item C"
End With
.FilterBarFont = .Font
.FilterBarPrompt = .FormatABC("`<b>` + value",.FilterBarPrompt)
.FilterBarCaption = "`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount " & _
"+ 1) + ` result(s)` ) : (`<fgcolor=808080>`+ itemcount + ` item(s)`) )"
.FilterBarPromptVisible = 3591 ' FilterBarVisibleEnum.exFilterBarCompact Or FilterBarVisibleEnum.exFilterBarShowCloseOnRight Or FilterBarVisibleEnum.exFilterBarShowCloseIfRequired Or FilterBarVisibleEnum.exFilterBarCaptionVisible Or FilterBarVisibleEnum.exFilterBarVisible Or FilterBarVisibleEnum.exFilterBarPromptVisible
.EndUpdate
End With
|
518
|
How can I get the number of results being shown in the control's filter bar (sample 3)

With ComboBox1
.BeginUpdate
.Columns.Add("Item").DisplayFilterButton = True
With .Columns.Add("Pos")
.AllowSizing = False
.AllowSort = False
.Width = 32
.FormatColumn = "1 apos ``"
.Position = 0
End With
With .Items
.AddItem "Item A"
.AddItem "Item B"
.AddItem "Item C"
End With
.FilterBarFont = .Font
.FilterBarCaption = "`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount " & _
"+ 1) + ` result(s)` ) : ``)"
.FilterBarPromptVisible = 2055 ' FilterBarVisibleEnum.exFilterBarCompact Or FilterBarVisibleEnum.exFilterBarCaptionVisible Or FilterBarVisibleEnum.exFilterBarVisible Or FilterBarVisibleEnum.exFilterBarPromptVisible
With .Columns.Item(0)
.FilterType = 240
.Filter = "Item A|Item B"
End With
.ApplyFilter
.EndUpdate
End With
|
517
|
How can I get the number of results being shown in the control's filter bar (sample 2, compact)

With ComboBox1
.BeginUpdate
.Columns.Add("Item").DisplayFilterButton = True
With .Columns.Add("Pos")
.AllowSizing = False
.AllowSort = False
.Width = 32
.FormatColumn = "1 apos ``"
.Position = 0
End With
With .Items
.AddItem "Item A"
.AddItem "Item B"
.AddItem "Item C"
End With
.FilterBarFont = .Font
.FilterBarCaption = "`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? `<off -4> ` + abs(matchitemcount + 1) + ` result(s)` : ``)"
.FilterBarPromptVisible = 2071 ' FilterBarVisibleEnum.exFilterBarCompact Or FilterBarVisibleEnum.exFilterBarSingleLine Or FilterBarVisibleEnum.exFilterBarCaptionVisible Or FilterBarVisibleEnum.exFilterBarVisible Or FilterBarVisibleEnum.exFilterBarPromptVisible
With .Columns.Item(0)
.FilterType = 240
.Filter = "Item A|Item B"
End With
.ApplyFilter
.EndUpdate
End With
|
516
|
How can I get the number of results being shown in the control's filter bar (sample 1)

With ComboBox1
.BeginUpdate
.Columns.Add("Item").DisplayFilterButton = True
With .Columns.Add("Pos")
.AllowSizing = False
.AllowSort = False
.Width = 32
.FormatColumn = "1 apos ``"
.Position = 0
End With
With .Items
.AddItem "Item A"
.AddItem "Item B"
.AddItem "Item C"
End With
.FilterBarFont = .Font
.FilterBarCaption = "`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? abs(matchitemcount + 1) + ` result(s)` : ``)"
.FilterBarPromptVisible = 7 ' FilterBarVisibleEnum.exFilterBarCaptionVisible Or FilterBarVisibleEnum.exFilterBarVisible Or FilterBarVisibleEnum.exFilterBarPromptVisible
With .Columns.Item(0)
.FilterType = 240
.Filter = "Item A|Item B"
End With
.ApplyFilter
.EndUpdate
End With
|
504
|
How can I get the number of results after a filter is applied

' Click event - Occurs when the user presses and then releases the left mouse button over the list control.
Private Sub ComboBox1_Click()
With ComboBox1
.ClearFilter
End With
End Sub
' FilterChange event - Occurs when filter was changed.
Private Sub ComboBox1_FilterChange()
With ComboBox1
Debug.Print( "Items.MatchItemCount" )
Debug.Print( .Items.MatchItemCount )
Debug.Print( .FormatABC("value < 0 ? `filter applied: ` + abs(value + 1) + ` result(s)` : `no filter`",.Items.MatchItemCount) )
End With
End Sub
With ComboBox1
.BeginUpdate
.Columns.Add("Item").DisplayFilterButton = True
With .Columns.Add("Pos")
.AllowSizing = False
.AllowSort = False
.Width = 32
.FormatColumn = "1 apos ``"
.Position = 0
End With
With .Items
.AddItem "Item A"
.AddItem "Item B"
.AddItem "Item C"
End With
.FilterBarPromptVisible = 1
.FilterBarPromptPattern = "Item"
.EndUpdate
End With
|
420
|
How can I get the number of occurrences of a specified string in the cell

With ComboBox1
.Columns.Add ""
With .Columns.Add("occurrences")
.ComputedField = "lower(%0) count 'o'"
.FormatColumn = "'contains ' + value + ' of \'o\' chars'"
End With
With .Items
h = .AddItem("Root")
.InsertItem h,,"Child 1 oooof the root"
.InsertItem h,,"Child 2"
.InsertItem h,,"Child 3"
.ExpandItem(h) = True
End With
End With
|
399
|
How can I get the number of occurrences of a specified string in the cell

With ComboBox1
.Columns.Add ""
With .Columns.Add("occurrences")
.ComputedField = "lower(%0) count 'o'"
.FormatColumn = "'contains ' + value + ' of \'o\' chars'"
End With
With .Items
h = .AddItem("Root")
.InsertItem h,,"Child 1 oooof the root"
.InsertItem h,,"Child 2"
.InsertItem h,,"Child 3"
.ExpandItem(h) = True
End With
End With
|
277
|
How can I get the handle of an item based on the handle of the cell

With ComboBox1
.Columns.Add "Default"
With .Items
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
.ItemBold(.CellItem(.ItemCell(h,0))) = True
End With
End With
|
222
|
How can I get the columns as they are shown in the control's sortbar
With ComboBox1
Set var_Object = .Columns.ItemBySortPosition(0)
End With
|
386
|
How can I get second part of the date

With ComboBox1
.Columns.Add "Date"
.Columns.Add("Second").ComputedField = "sec(date(%0))"
With .Items
.AddItem #1/11/2001 10:10:00 AM#
.AddItem #2/22/2002 11:01:22 AM#
.AddItem #3/13/2003 0:23:01 PM#
.AddItem #4/14/2004 1:11:59 PM#
End With
End With
|
65
|
How can I get ride/hide of the "Filter For" field

With ComboBox1
With .Columns.Add("Column")
.DisplayFilterButton = True
.DisplayFilterPattern = False
End With
End With
|
368
|
How can I get or display the integer part of the cell

With ComboBox1
.Columns.Add "Number"
.Columns.Add("Int").ComputedField = "int(%0)"
With .Items
.AddItem "-1.98"
.AddItem "0.99"
.AddItem "1.23"
.AddItem "2.34"
End With
End With
|
379
|
How can I get only the year part from a date expression

With ComboBox1
.Columns.Add "Date"
.Columns.Add("Year").ComputedField = "year(%0)"
With .Items
.AddItem #1/1/2001 10:00:00 AM#
.AddItem #2/2/2002 11:00:00 AM#
.AddItem #3/3/2003 0:00:00 PM#
.AddItem #4/4/2004 1:00:00 PM#
End With
End With
|
385
|
How can I get minute part of the date

With ComboBox1
.Columns.Add "Date"
.Columns.Add("Minute").ComputedField = "min(date(%0))"
With .Items
.AddItem #1/11/2001 10:10:00 AM#
.AddItem #2/22/2002 11:01:00 AM#
.AddItem #3/13/2003 0:23:00 PM#
.AddItem #4/14/2004 1:11:00 PM#
End With
End With
|
309
|
How can I fix or lock items

With ComboBox1
.Columns.Add "Default"
With .Items
.LockedItemCount(0) = 1
.CellCaption(.LockedItem(0,0),0) = "This is a locked item, fixed to the top side of the control."
.ItemBackColor(.LockedItem(0,0)) = RGB(196,196,186)
.LockedItemCount(2) = 2
.CellCaption(.LockedItem(2,0),0) = "This is a locked item, fixed to the top side of the control."
.ItemBackColor(.LockedItem(2,0)) = RGB(196,196,186)
.CellCaption(.LockedItem(2,1),0) = "This is a locked item, fixed to the top side of the control."
.ItemBackColor(.LockedItem(2,1)) = RGB(186,186,186)
End With
End With
|
307
|
How can I fix or lock an item on the top of the control

With ComboBox1
.Columns.Add "Default"
With .Items
.LockedItemCount(0) = 1
.CellCaption(.LockedItem(0,0),0) = "This is a locked item, fixed to the top side of the control."
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
End With
End With
|
308
|
How can I fix or lock an item on the bottom side of the control

With ComboBox1
.Columns.Add "Default"
With .Items
.LockedItemCount(2) = 1
.CellCaption(.LockedItem(2,0),0) = "This is a locked item, fixed to the bottom side of the control."
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
End With
End With
|
292
|
How can I find the cell being clicked in a radio group

With ComboBox1
.MarkSearchColumn = False
.SelBackColor = RGB(255,255,128)
.SelForeColor = RGB(0,0,0)
.Columns.Add "C1"
.Columns.Add "C2"
.Columns.Add "C3"
With .Items
h = .AddItem("Cell 1")
.CellCaption(h,1) = "Radio 1"
.CellHasRadioButton(h,1) = True
.CellRadioGroup(h,1) = 1234
.CellCaption(h,2) = "Radio 2"
.CellHasRadioButton(h,2) = True
.CellRadioGroup(h,2) = 1234
.CellState(h,1) = 1
.CellBold(,.CellChecked(1234)) = True
End With
End With
|
489
|
How can I find if there is any filter applied to the control

' FilterChange event - Occurs when filter was changed.
Private Sub ComboBox1_FilterChange()
With ComboBox1
Debug.Print( "If negative, the filter is present, else not" )
Debug.Print( .Items.VisibleItemCount )
End With
End Sub
With ComboBox1
.BeginUpdate
.LinesAtRoot = -1
.TreeColumnIndex = -1
.FilterInclude = 4
With .Columns.Add("Column")
.DisplayFilterButton = True
.FilterType = 240
.Filter = "C1"
End With
With .Items
h = .AddItem("R1")
.InsertItem h,,"C1"
.InsertItem h,,"C2"
.ExpandItem(h) = True
h = .AddItem("R2")
.InsertItem h,,"C1"
.InsertItem h,,"C2"
End With
.ApplyFilter
.EndUpdate
End With
|
497
|
How can I find if the control is running in DPI mode
With ComboBox1
Debug.Print( .FormatABC("dpi = 1 ? `normal/stretch mode` : `dpi mode`") )
End With
|
44
|
How can I filter the items that are between an interval/range of dates

With ComboBox1
With .Columns.Add("Column")
.DisplayFilterButton = True
.DisplayFilterDate = True
End With
.ApplyFilter
End With
|
412
|
How can I filter programatically using more columns

With ComboBox1
.BeginUpdate
.MarkSearchColumn = False
With .Columns
.Add "Car"
.Add "Equipment"
End With
With .Items
.CellCaption(.AddItem("Mazda"),1) = "Air Bag"
.CellCaption(.AddItem("Toyota"),1) = "Air Bag,Air condition"
.CellCaption(.AddItem("Ford"),1) = "Air condition"
.CellCaption(.AddItem("Nissan"),1) = "Air Bag,ABS,ESP"
.CellCaption(.AddItem("Mazda"),1) = "Air Bag, ABS,ESP"
.CellCaption(.AddItem("Mazda"),1) = "ABS,ESP"
End With
With .Columns.Item("Car")
.FilterType = 240
.Filter = "Mazda"
End With
With .Columns.Item("Equipment")
.FilterType = 3
.Filter = "*ABS*|*ESP*"
End With
.ApplyFilter
.EndUpdate
End With
|
426
|
How can I expand all items

With ComboBox1
.BeginUpdate
.LinesAtRoot = -1
.Columns.Add "Items"
With .Items
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
h = .AddItem("Root 2")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(0) = True
End With
.EndUpdate
End With
|
341
|
How can I ensure that the drop down portions doesn't show partial items

With ComboBox1
.IntegralHeight = True
.LinesAtRoot = 1
.TreeColumnIndex = 1
.Columns.Add "Column 1"
.Columns.Add "Column 2"
With .Items
h = .AddItem("Root 1.1")
.CellCaption(h,1) = "Root 1.2"
.CellCaption(.InsertItem(h,,"Child 1.1"),1) = "Child 1.2"
.CellCaption(.InsertItem(h,,"Child 2.1"),1) = "Child 2.2"
.ExpandItem(h) = True
h = .AddItem("Root 2.1")
.CellCaption(h,1) = "Root 2.2"
.CellCaption(.InsertItem(h,,"Child 1.1"),1) = "Child 1.2"
End With
End With
|
580
|
How can I enable the clear-button (visible only if required)

With ComboBox1
.BeginUpdate
.Style = 2
.HeaderVisible = False
.IntegralHeight = True
.ShowClearButton = 1
.Columns.Add "Column"
With .Items
.AddItem "Zero"
.AddItem "One"
.AddItem "Two"
End With
.Select(0) = "Zero"
.EndUpdate
End With
|
584
|
How can I enable the clear-button (visible only if required and focused)
With ComboBox1
.BeginUpdate
.Style = 2
.HeaderVisible = False
.IntegralHeight = True
.ShowClearButton = 3
.Columns.Add "Column"
With .Items
.AddItem "Zero"
.AddItem "One"
.AddItem "Two"
End With
.Select(0) = "Zero"
.EndUpdate
End With
|
583
|
How can I enable the clear-button (visible only if focused)
With ComboBox1
.BeginUpdate
.Style = 2
.HeaderVisible = False
.IntegralHeight = True
.ShowClearButton = 2
.Columns.Add "Column"
With .Items
.AddItem "Zero"
.AddItem "One"
.AddItem "Two"
End With
.Select(0) = "Zero"
.EndUpdate
End With
|
581
|
How can I enable the clear-button (always visible)

With ComboBox1
.BeginUpdate
.Style = 2
.HeaderVisible = False
.IntegralHeight = True
.ShowClearButton = -1
.Columns.Add "Column"
With .Items
.AddItem "Zero"
.AddItem "One"
.AddItem "Two"
End With
.Select(0) = "Zero"
.EndUpdate
End With
|
18
|
How can I draw grid lines only for visible items

With ComboBox1
.MarkSearchColumn = False
.DrawGridLines = -2
.Columns.Add "Column 1"
.Columns.Add "Column 2"
.Items.AddItem 0
.Items.AddItem 1
.Items.AddItem 2
End With
|
554
|
How can I display UNICODE characters

With ComboBox1
.BeginUpdate
With .Font
.Name = "Arial Unicode"
.Size = 22
End With
.HeaderVisible = False
.DefaultItemHeight = 48
.Columns.Add("").Def(17) = 1
With .Items
.AddItem "Ӓӓ"
.AddItem "ᦜᦝ;ᦞ"
.AddItem "ɮɭ;ɯ"
.AddItem "勳勴勵勶"
.FormatCell(.AddItem(ComboBox1.Version),0) = "(value lfind `UNICODE`) < 0 ? `<fgcolor=FF0000><b>!UNICODE!</b> version</fgcolor> required: ` + value : `` "
End With
.EndUpdate
End With
|
415
|
How can I display true or false instead 0 and -1

With ComboBox1
.Columns.Add("Boolean").FormatColumn = "value != 0 ? 'true' : 'false'"
With .Items
.AddItem True
.AddItem False
.AddItem True
.AddItem 0
.AddItem 1
End With
End With
|
393
|
How can I display true or false instead 0 and -1

With ComboBox1
.Columns.Add("Boolean").FormatColumn = "value != 0 ? 'true' : 'false'"
With .Items
.AddItem True
.AddItem False
.AddItem True
.AddItem 0
.AddItem 1
End With
End With
|
374
|
How can I display the time only of a date expression

With ComboBox1
.Columns.Add "Date"
.Columns.Add("Time").ComputedField = "'time is:' + time(date(%0))"
With .Items
.AddItem #1/1/2001 10:00:00 AM#
.AddItem #2/2/2002 11:00:00 AM#
.AddItem #3/3/2003 0:00:00 PM#
.AddItem #4/4/2004 1:00:00 PM#
End With
End With
|
387
|
How can I display the number of days between two dates

With ComboBox1
.Columns.Add "Start"
.Columns.Add "End"
.Columns.Add("Duration").ComputedField = "(date(%1)-date(%0)) + ' days'"
With .Items
h = .AddItem(#1/11/2001#)
.CellCaption(h,1) = #1/14/2001#
h = .AddItem(#2/22/2002#)
.CellCaption(h,1) = #3/14/2002#
h = .AddItem(#3/13/2003#)
.CellCaption(h,1) = #4/11/2003#
End With
End With
|
390
|
How can I display the currency only for not empty cells

With ComboBox1
.Columns.Add "Number"
.Columns.Add("Currency").ComputedField = "len(%0) ? currency(dbl(%0)) : ''"
With .Items
.AddItem "1.23"
.AddItem "2.34"
.AddItem "0"
.ItemBackColor(.AddItem()) = RGB(255,128,128)
.AddItem "10000.99"
End With
End With
|
505
|
How can I display the control's filter on a single line (prompt-combined)

With ComboBox1
.BeginUpdate
.Columns.Add("Item").DisplayFilterButton = True
With .Columns.Add("Pos")
.AllowSizing = False
.AllowSort = False
.Width = 32
.FormatColumn = "1 apos ``"
.Position = 0
End With
With .Items
.AddItem "Item A"
.AddItem "Item B"
.AddItem "Item C"
End With
.FilterBarCaption = "`<r>` + value"
.FilterBarPromptVisible = 2067 ' FilterBarVisibleEnum.exFilterBarCompact Or FilterBarVisibleEnum.exFilterBarSingleLine Or FilterBarVisibleEnum.exFilterBarVisible Or FilterBarVisibleEnum.exFilterBarPromptVisible
With .Columns.Item(0)
.FilterType = 240
.Filter = "Item A|Item B"
End With
.ApplyFilter
.EndUpdate
End With
|
506
|
How can I display the control's filter on a single line

With ComboBox1
.BeginUpdate
.Columns.Add("Item").DisplayFilterButton = True
With .Columns.Add("Pos")
.AllowSizing = False
.AllowSort = False
.Width = 32
.FormatColumn = "1 apos ``"
.Position = 0
End With
With .Items
.AddItem "Item A"
.AddItem "Item B"
.AddItem "Item C"
End With
.FilterBarCaption = "len(value) ? `filter for: <fgcolor 808080>` + value : `<fgcolor 808080>no filter`"
.FilterBarPromptVisible = 18 ' FilterBarVisibleEnum.exFilterBarSingleLine Or FilterBarVisibleEnum.exFilterBarVisible
With .Columns.Item(0)
.FilterType = 240
.Filter = "Item A|Item B"
End With
.ApplyFilter
.EndUpdate
End With
|
400
|
How can I display the column using currency format and enlarge the font for certain values

With ComboBox1
With .Columns.Add("Currency")
.Def(17) = 1
.FormatColumn = "len(value) ? ((0:=dbl(value)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + currency(=:0)"
End With
With .Items
.AddItem "1.23"
.AddItem "2.34"
.AddItem "9.94"
.AddItem "11.94"
.AddItem "1000"
End With
End With
|
422
|
How can I display the column using currency format and enlarge the font for certain values

With ComboBox1
With .Columns.Add("Currency")
.Def(17) = 1
.FormatColumn = "len(value) ? ((0:=dbl(value)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + currency(=:0)"
End With
With .Items
.AddItem "1.23"
.AddItem "2.34"
.AddItem "9.94"
.AddItem "11.94"
.AddItem "1000"
End With
End With
|
391
|
How can I display the column using currency

With ComboBox1
.Columns.Add("Currency").FormatColumn = "currency(dbl(value))"
With .Items
.AddItem "1.23"
.AddItem "2.34"
.AddItem "0"
.AddItem 5
.AddItem "10000.99"
End With
End With
|
413
|
How can I display the column using currency

With ComboBox1
.Columns.Add("Currency").FormatColumn = "currency(dbl(value))"
With .Items
.AddItem "1.23"
.AddItem "2.34"
.AddItem "0"
.AddItem 5
.AddItem "10000.99"
End With
End With
|
356
|
How can I display the column's header using multiple lines

With ComboBox1
.HeaderHeight = 128
.HeaderSingleLine = False
.Columns.Add("This is just a column that should break the header.").Width = 32
.Columns.Add "This is just another column that should break the header."
End With
|
56
|
How can I display the column's filter

With ComboBox1
.Columns.Add("").DisplayFilterButton = True
End With
|
416
|
How can I display only the right part of the cell

With ComboBox1
.Columns.Add ""
With .Columns.Add("Right")
.ComputedField = "%0 right 2"
.FormatColumn = "'""' + value + '""'"
End With
With .Items
h = .AddItem("Root")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.InsertItem h,,"SChild 3"
.ExpandItem(h) = True
End With
End With
|
395
|
How can I display only the right part of the cell

With ComboBox1
.Columns.Add ""
With .Columns.Add("Right")
.ComputedField = "%0 right 2"
.FormatColumn = "'""' + value + '""'"
End With
With .Items
h = .AddItem("Root")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.InsertItem h,,"SChild 3"
.ExpandItem(h) = True
End With
End With
|
380
|
How can I display only the month of the date

With ComboBox1
.Columns.Add "Date"
.Columns.Add("Month").ComputedField = "month(%0)"
With .Items
.AddItem #1/1/2001 10:00:00 AM#
.AddItem #2/2/2002 11:00:00 AM#
.AddItem #3/3/2003 0:00:00 PM#
.AddItem #4/4/2004 1:00:00 PM#
End With
End With
|
394
|
How can I display only the left part of the cell

With ComboBox1
.Columns.Add ""
.Columns.Add("Left").ComputedField = "%0 left 2"
With .Items
h = .AddItem("Root")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.InsertItem h,,"SChild 3"
.ExpandItem(h) = True
End With
End With
|
381
|
How can I display only the day of the date

With ComboBox1
.Columns.Add "Date"
.Columns.Add("Day").ComputedField = "day(%0)"
With .Items
.AddItem #1/11/2001 10:00:00 AM#
.AddItem #2/22/2002 11:00:00 AM#
.AddItem #3/13/2003 0:00:00 PM#
.AddItem #4/14/2004 1:00:00 PM#
End With
End With
|
439
|
How can I display numbers with 2 digits in each group

With ComboBox1
.BeginUpdate
.Columns.Add("Def").Def(17) = 1
With .Items
h = .AddItem(100000.27)
.FormatCell(h,0) = "(value format '') + ' <fgcolor=808080>(default)'"
h = .AddItem(100000.27)
.FormatCell(h,0) = "(value format '||2') + ' <fgcolor=808080>(grouping by 2 digits)'"
End With
.EndUpdate
End With
|
367
|
How can I display names as proper ( first leter of the word must be in uppercase, and the rest in lowercase )

With ComboBox1
.Columns.Add("").ComputedField = "proper(%0)"
With .Items
h = .AddItem("root")
.InsertItem h,,"child child"
.InsertItem h,,"child child"
.InsertItem h,,"child child"
.ExpandItem(h) = True
End With
End With
|
168
|
How can I display my text on the scroll bar, using a different font

With ComboBox1
.ScrollPartCaption(1,256) = "This is <s><font Tahoma;12> just </font></s> text"
.ColumnAutoResize = False
.ScrollHeight = 20
.Columns.Add("C1").Width = 256
.Columns.Add("C2").Width = 256
.Columns.Add("C3").Width = 256
End With
|
167
|
How can I display my text on the scroll bar, using a different font

With ComboBox1
.ScrollPartCaption(1,256) = "This is just a text"
.ScrollFont(1).Size = 12
.ColumnAutoResize = False
.ScrollHeight = 20
.Columns.Add("C1").Width = 256
.Columns.Add("C2").Width = 256
.Columns.Add("C3").Width = 256
End With
|
166
|
How can I display my text on the scroll bar

With ComboBox1
.ScrollPartCaption(1,256) = "this is just a text"
.ColumnAutoResize = False
.Columns.Add("C1").Width = 256
.Columns.Add("C2").Width = 256
.Columns.Add("C3").Width = 256
End With
|
438
|
How can I display my numbers using a different decimal separator

With ComboBox1
.BeginUpdate
.Columns.Add("Def").Def(17) = 1
With .Items
h = .AddItem(100.27)
.FormatCell(h,0) = "(value format '') + ' <fgcolor=808080>(default)'"
h = .AddItem(100.27)
.FormatCell(h,0) = "(value format '|;') + ' <fgcolor=808080>(decimal separator is <b>;</b>)'"
End With
.EndUpdate
End With
|
414
|
How can I display icons or images instead numbers

With ComboBox1
.Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
With .Columns.Add("Icons")
.Def(17) = 1
.FormatColumn = "'The cell displays the icon <img>'+value+'</img> instead ' + value"
End With
With .Items
.AddItem 1
.AddItem 2
.AddItem 3
End With
End With
|
392
|
How can I display icons or images instead numbers

With ComboBox1
.Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
With .Columns.Add("Icons")
.Def(17) = 1
.FormatColumn = "'The cell displays the icon <img>'+value+'</img> instead ' + value"
End With
With .Items
.AddItem 1
.AddItem 2
.AddItem 3
End With
End With
|
397
|
How can I display dates in short format

With ComboBox1
.Columns.Add("Date").FormatColumn = "shortdate(value)"
With .Items
.AddItem #1/1/2001#
.AddItem #2/2/2002#
.AddItem #3/3/2003#
.AddItem #4/4/2004#
End With
End With
|
375
|
How can I display dates in short format

With ComboBox1
.Columns.Add "Date"
.Columns.Add("ShortFormat").ComputedField = "shortdate(%0)"
With .Items
.AddItem #1/1/2001 10:00:00 AM#
.AddItem #2/2/2002 11:00:00 AM#
.AddItem #3/3/2003 0:00:00 PM#
.AddItem #4/4/2004 1:00:00 PM#
End With
End With
|
418
|
How can I display dates in short format

With ComboBox1
.Columns.Add("Date").FormatColumn = "shortdate(value)"
With .Items
.AddItem #1/1/2001#
.AddItem #2/2/2002#
.AddItem #3/3/2003#
.AddItem #4/4/2004#
End With
End With
|
419
|
How can I display dates in my format

With ComboBox1
With .Columns.Add("Date")
.Def(17) = 1
.FormatColumn = "'<b>' + year(0:=date(value)) + '</b><fgcolor=808080><font ;6> (' + month(=:0) + ' - ' + day(=:0) +')'"
End With
With .Items
.AddItem #1/21/2001#
.AddItem #2/22/2002#
.AddItem #3/13/2003#
.AddItem #4/24/2004#
End With
End With
|
398
|
How can I display dates in my format

With ComboBox1
With .Columns.Add("Date")
.Def(17) = 1
.FormatColumn = "'<b>' + year(0:=date(value)) + '</b><fgcolor=808080><font ;6> (' + month(=:0) + ' - ' + day(=:0) +')'"
End With
With .Items
.AddItem #1/21/2001#
.AddItem #2/22/2002#
.AddItem #3/13/2003#
.AddItem #4/24/2004#
End With
End With
|
417
|
How can I display dates in long format

With ComboBox1
.Columns.Add("Date").FormatColumn = "longdate(value)"
With .Items
.AddItem #1/1/2001#
.AddItem #2/2/2002#
.AddItem #3/3/2003#
.AddItem #4/4/2004#
End With
End With
|
396
|
How can I display dates in long format

With ComboBox1
.Columns.Add("Date").FormatColumn = "longdate(value)"
With .Items
.AddItem #1/1/2001#
.AddItem #2/2/2002#
.AddItem #3/3/2003#
.AddItem #4/4/2004#
End With
End With
|
376
|
How can I display dates in long format

With ComboBox1
.Columns.Add "Date"
.Columns.Add("LongFormat").ComputedField = "longdate(%0)"
With .Items
.AddItem #1/1/2001 10:00:00 AM#
.AddItem #2/2/2002 11:00:00 AM#
.AddItem #3/3/2003 0:00:00 PM#
.AddItem #4/4/2004 1:00:00 PM#
End With
End With
|
271
|
How can I display an item or a cell on multiple lines

With ComboBox1
.ScrollBySingleLine = True
.Columns.Add "C1"
.Columns.Add "C2"
With .Items
h = .AddItem("Cell 1")
.CellCaption(h,1) = "This is bit of text that's shown on multiple lines"
.CellSingleLine(h,1) = False
End With
End With
|
198
|
How can I display all cells using multiple lines

With ComboBox1
.Columns.Add("MultipleLine").Def(16) = False
.Columns.Add("SingleLine").Def(16) = True
With .Items
.CellCaption(.AddItem("This is a bit of long text that should break the line"),1) = "this is a bit of long text that's displayed on a single line"
End With
End With
|
199
|
How can I display all cells using HTML format

With ComboBox1
.Columns.Add("HTML").Def(17) = 1
.Items.AddItem "<font ;12>T</font>his <b>is</b> an <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor></font>."
End With
|
190
|
How can I display a tooltip when the cursor hovers the column

With ComboBox1
.Columns.Add("tooltip").ToolTip = "This is a bit of text that is shown when user hovers the column."
End With
|
159
|
How can I display a multiple pictures to a cell or item

With ComboBox1
.DefaultItemHeight = 48
.HTMLPicture("pic1") = "c:\exontrol\images\zipdisk.gif"
.HTMLPicture("pic2") = "c:\exontrol\images\auction.gif"
.Columns.Add "C1"
With .Items
.CellCaptionFormat(.AddItem("<img>pic1</img> Text <img>pic2</img> another text ..."),0) = 1
End With
End With
|
406
|
How can I display a filter field in the bottom part of the drop down portion

With ComboBox1
.BeginUpdate
.FilterForVisible = True
.IntegralHeight = True
.Columns.Add "Default"
With .Items
.AddItem "Item 1"
.AddItem "Item 2"
.AddItem "Item 3"
.AddItem "Item 4"
.AddItem "Item 5"
End With
.EndUpdate
End With
|
310
|
How can I display a divider item, merging all cells

With ComboBox1
.MarkSearchColumn = False
.TreeColumnIndex = -1
.Columns.Add "C1"
.Columns.Add "C2"
With .Items
h = .AddItem("Cell 1")
.CellCaption(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines."
.CellSingleLine(h,1) = False
h = .AddItem("This is bit of text that's displayed on the entire item, divider.")
.ItemDivider(h) = 0
.CellHAlignment(h,0) = 1
End With
End With
|
485
|
How can I display a different column, on the control's label (method 2)

With ComboBox1
.BeginUpdate
.Style = 2
.SingleEdit = True
.LabelColumnIndex = 1
.DrawGridLines = 2
.Columns.Add("Column 1").Def(17) = 1
.Columns.Add("Column 2").Def(17) = 1
With .Items
.CellCaption(.AddItem("Item 1 on <b>Column 1"),1) = "Item 1 on <b>Column 2"
.CellCaption(.AddItem("Item 2 on <b>Column 1"),1) = "Item 2 on <b>Column 2"
.CellCaption(.AddItem("Item 3 on <b>Column 1"),1) = "Item 3 on <b>Column 2"
.SelectItem(.FirstVisibleItem) = True
End With
.EndUpdate
End With
|
484
|
How can I display a different column, on the control's label (method 1)

With ComboBox1
.BeginUpdate
.Style = 2
.SingleEdit = True
.SearchColumnIndex = 1
.DrawGridLines = 2
.Columns.Add("Column 1").Def(17) = 1
.Columns.Add("Column 2").Def(17) = 1
With .Items
.CellCaption(.AddItem("Item 1 on <b>Column 1"),1) = "Item 1 on <b>Column 2"
.CellCaption(.AddItem("Item 2 on <b>Column 1"),1) = "Item 2 on <b>Column 2"
.CellCaption(.AddItem("Item 3 on <b>Column 1"),1) = "Item 3 on <b>Column 2"
.SelectItem(.FirstVisibleItem) = True
End With
.EndUpdate
End With
|
410
|
How can I display a different caption in the label area, when I click the cell's check box

' CellStateChanged event - Fired after cell's state has been changed.
Private Sub ComboBox1_CellStateChanged(ByVal Cell As Long)
With ComboBox1
.LabelText = Cell
Debug.Print( .Items.CellCaption(0,Cell) )
Debug.Print( .Items.CellState(0,Cell) )
End With
End Sub
With ComboBox1
.BeginUpdate
.Style = 2
.IntegralHeight = True
.HeaderVisible = False
.SingleEdit = True
.SearchColumnIndex = -1
.AdjustSearchColumn = False
.Columns.Add("Language").Def(0) = True
With .Items
.AddItem "English"
.AddItem "Hebrew"
.AddItem "Spanish"
End With
.LabelText = " <b>custom</b> text "
.EndUpdate
End With
|